<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>订单管理-车速递</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="layui/css/layui.css" media="all">
    <link rel="stylesheet" href="css/mymain.mymain.css">
    <script type="application/javascript" src="js/jquery-3.3.1.js"></script>
    <script type="application/javascript" src="js/bootstrap.min.js"></script>
    <script type="application/javascript" src="layui/layui.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue"></script>

</head>
<body style="position: static">

<div id="app" class="bgGray">
    <div data-v-95ac8d30="" class="header3">
        <div data-v-95ac8d30="" class="layout clear">
            <div data-v-95ac8d30="" class="left logo">
                <a data-v-95ac8d30="" href="index.html">
                    <img data-v-95ac8d30="" src="">
                </a>
            </div> <div data-v-95ac8d30="" class="header3Nav right">|<a data-v-95ac8d30="" href="orderManage.html">我的订单</a>|<a data-v-95ac8d30="" href="helpCenter.html">帮助中心</a>|<a data-v-95ac8d30="" href="index.html">退出</a>
        </div>
            <div data-v-95ac8d30="" class="header3User right">
                <i data-v-95ac8d30="" class="iconfont icon-phone"></i>
                <span data-v-95ac8d30="" class="sp1">400-919-8000</span>
                <span data-v-95ac8d30="" class="sp2" id="user"></span>
                <span data-v-95ac8d30="" class="sp3"></span>
            </div>
        </div>
    </div>
    <div class="userInfo">
        <div class="layout">
            <div class="userInfoCom clear">
                <div class="userInfoL left">
                    <div data-v-1cae2c34="" class="userNav">
                        <dl data-v-1cae2c34="" class="userMsg">
                            <dt data-v-1cae2c34="">
                                <img data-v-1cae2c34="" src="">
                            </dt>
                            <dd data-v-1cae2c34="">
                                <p data-v-1cae2c34=""></p>
                                <p data-v-1cae2c34="" class="p5 pp" style="">普卡会员</p>
                            </dd>
                        </dl>
                        <ul data-v-1cae2c34="" class="manNav">
                            <li data-v-1cae2c34="">
                                <a data-v-1cae2c34="" href="mymain.html" class="">订单管理</a>
                            </li>
                            <li data-v-1cae2c34="">
                                <a data-v-1cae2c34="" href="myinfo.html" class="sel">个人信息</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="userInfoR right">

                    <div class="orderManage manage">
                        <div class="orderManageTit manageTit clear">
                            <div class="left tit">个人信息</div>
                        </div>
<div class="site-demo-button" id="layerDemo" style="margin-bottom: 0;">
                        <div class="orderList list" id="noda">
                            <form class="layui-form" method="post">
                                <input name="cus_id" id="cus_id" type="hidden">
                                <div class="layui-form-item">
                                    <i class="layui-icon layui-icon-username" style="font-size: 20px;"></i>
                                    <div class="layui-inline">
                                        <div class="layui-input-inline">
                                            <input type="text" name="cus_name" id="name" readonly="readonly" lay-verify="required|username" placeholder="请输入用户名" autocomplete="off" class="layui-input"><span><font color="red">用户名不可修改</font></span>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <i class="layui-icon layui-icon-cellphone" style="font-size: 20px;"></i>
                                    <div class="layui-inline">
                                        <div class="layui-input-inline">
                                            <input type="text" name="cus_tel" id="tel"  lay-verify="required|phone" placeholder="请输入手机号" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <i class="layui-icon layui-icon-password" style="font-size: 20px;"></i>
                                    <div class="layui-inline">
                                        <div class="layui-input-inline">
                                            <input type="password" name="cus_pass" id="pass" lay-verify="password" placeholder="请输入6-12位密码" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <i class="layui-icon layui-icon-user" style="font-size: 20px;"></i>
                                    <div class="layui-inline">
                                        <div class="layui-input-inline">
                                            <input type="text" name="cus_cardid" id="card" lay-verify="password" readonly="readonly" autocomplete="off" class="layui-input"><span><font color="red">身份证号不可修改</font></span>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <i class="layui-icon layui-icon-date" style="font-size: 20px; "></i>
                                    <div class="layui-inline">
                                        <div class="layui-input-inline">
                                            <input type="date" name="cus_birthday" id="birthday" lay-verify="date" placeholder="请输入你的生日" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <i class="layui-icon layui-icon-user" style="font-size: 20px; "></i>
                                    <div class="layui-inline">
                                        <div class="layui-input-inline">
                                            <input type="email" name="cus_email" id="email" lay-verify="email" placeholder="请输入电子邮箱，用于登录和找回密码" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <i class="layui-icon layui-icon-user" style="font-size: 20px;"></i>
                                    <div class="layui-inline">
                                        <div class="layui-input-inline">
                                            <input type="text" name="cus_sex"id="sex" lay-verify="invitation" autocomplete="off" placeholder="请输入你的性别" class="layui-input">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                                    </div>
                                </div>

                            </form>
                        </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div data-v-3aaf9db2="" class="footer2">
        <div data-v-3aaf9db2="" class="layout clear">
            <div data-v-3aaf9db2="" class="d1">
                <a data-v-3aaf9db2="" href="about.html">关于车速递</a></div></div></div>

</div>
<script>
    var id=window.localStorage.getItem("id");

    $(function (){
        $.ajax({
            url: "getCusByid/"+id ,
            dataType:"json",
            type: 'post',
            contentType: 'application/json',
            success:function (res){
                console.log(res);
                if(res!=null){
                    $("#user").text("你好 "+ res.cus_name);
                    $("#cus_id").val(res.cus_id);
                    $("#name").val(res.cus_name);
                    $("#tel").val(res.cus_tel);
                    $("#pass").val(res.cus_pass);
                    $("#card").val(res.cus_cardid);
                    $("#sex").val(res.cus_sex);
                    $("#birthday").val(res.cus_birthday);
                    $("#email").val(res.cus_email);
                }
            }
        })
    })

</script>
    <script>

    layui.use(['form'], function () {
        var form = layui.form,
            // upload = layui.upload,
            // element = layui.element,
            layer = layui.layer,
            $ = layui.$;

        form.on('submit(demo1)', function (data) {

            $.ajax({
                url: '/updateCustoms',
                data: JSON.stringify(data.field),
                type: "post",
                contentType: "application/json",
                dataType: "json",
                success: function (res) {
                    console.log(2222222222);
                    console.log(res);
                    if (res ==true) {
                        // var iframeIndex = parent.layer.getFrameIndex(window.name);
                        // parent.layer.close(iframeIndex);
                        alert("修改成功");
                        // window.localStorage.setItem("res",res);
                        location.href = 'myinfo.html';

                    }else{
                        console.log(111111111);

                        alert("修改失败");

                    }
                }

            })
            console.log(2222222)
            // alert("注册失败");
            // location.href="/getAllUser.html";
            // form.render("select");
            // return false;

        });
    });
</script>



</body>
</html>
